from flask import Flask
from flask_cors import CORS, cross_origin

app = Flask(__name__)
CORS(app)


@app.route('/')
def hello_world():
    return 'Hello World!'


@app.route("/cross_router")
@cross_origin()
def cross_router():
    """
    装饰器，适用于配置特定的api接口
    :return:
    """
    return "Hello, cross-origin-world!"


if __name__ == '__main__':
    app.run()
